#include <QtCore/QCoreApplication>
#include <QtCore/qglobal.h>
#include "testnet.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    // 发送https请求前准备工作;
    QNetworkAccessManager* pManager = new QNetworkAccessManager(&a);
    qDebug() << pManager->supportedSchemes();

    TestNet One;
    One.GetWeb();

//    QNetworkRequest request;
//    QSslConfiguration config;
//    QSslConfiguration conf = request.sslConfiguration();
//    conf.setPeerVerifyMode(QSslSocket::VerifyNone);
//    conf.setProtocol(QSsl::TlsV1SslV3);
//    request.setSslConfiguration(conf);

//    request.setUrl(QUrl("https://www.baidu.com"));       // "https://www.temp.com"
//    QNetworkReply *pReply = pManager->post(request, bytePost);

//    connect(pReply , SIGNAL(finished()) , this , SLOT(onFinished());
//    connect(pReply , SIGNAL(error(QNetworkReply::NetworkError)) , this , SLOT(onError(QNetworkReply::NetworkError)));


    return a.exec();
}
